package com.example.test.service;

import com.example.test.vo.ResultCode;
import com.example.test.entity.User;
import com.example.test.exception.BusinessException;

public class UserService {
    public String addUser(User user) {
        if(user != null){
            throw new BusinessException(ResultCode.FAIL.getCode(),"添加用户异常,用户已经存在");
        }
        return "success";
    }
}
